Skip to content

gpiod: add build-gpiod.yml for riscv64 wheels - #1400

Merged
luhenry merged 4 commits into
mainfrom
gpiod
Sep 7, 2026
Merged

gpiod: add build-gpiod.yml for riscv64 wheels#1400
luhenry merged 4 commits into
mainfrom
gpiod

Conversation

@luhenry

@luhenry luhenry commented Sep 7, 2026

Copy link
Copy Markdown
Member

Python bindings for libgpiod, compiling its C library sources into gpiod._ext. Upstream publishes no riscv64 wheel.

Mirrors upstream's generate_pypi_artifacts.sh, which drives cibuildwheel over a checkout with no separate test step.

Differs from upstream

  • Checks out git.kernel.org directly - the python-v* tags aren't mirrored to github.com/brgl/libgpiod.

Testing

  • No CIBW test command upstream; added one exercising the compiled extension and the real chip-open error path, since the real suite needs a gpio-sim kernel module and a separately-built libgpiosim helper unavailable in the build container.

License: Vendors libgpiod's LGPL-2.1-or-later C sources and a GPL-2.0-only-with-syscall-note kernel UAPI header.

Not rehearsed locally - lib/uapi/gpio.h needs the real Linux linux/*.h headers; validating directly on the riscv64 CI runners.

Vendors libgpiod's C library sources via LIBGPIOD_VERSION (upstream's own
setup.py fetch_tarball mechanism), so no system libgpiod is needed. The
real test suite needs a gpio-sim kernel module and a separately-built
libgpiosim helper library, neither available in the build container, so
CI exercises the compiled extension and the real chip-open error path
instead, matching upstream's own release process which does not run
tests either.
Alpine needs linux-headers for lib/uapi/gpio.h's system linux/*.h includes;
manylinux already has them via glibc-devel.
luhenry added a commit that referenced this pull request Sep 7, 2026
Without it cibuildwheel defaulted to aarch64/x86_64 and matched zero
build identifiers against the cp*-*linux_riscv64 CIBW_BUILD selector.
Building wheels directly from a checkout meant setup.py's fetch_tarball
decorator took the full-fetch path during build_ext, which deletes LICENSE/
lib/include right after compiling -- breaking install_egg_info's license
copy. Upstream's own generate_pypi_artifacts.sh sidesteps this by building
the sdist with LIBGPIOD_VERSION set first, then feeding that sdist (already
carrying libgpiod-version.txt) to cibuildwheel, which takes the skip-fetch,
no-cleanup path instead.
@luhenry
luhenry merged commit 98caa61 into main Sep 7, 2026
14 checks passed
@luhenry
luhenry deleted the gpiod branch September 7, 2026 17:43
@luhenry luhenry mentioned this pull request Sep 7, 2026
@luhenry luhenry linked an issue Sep 7, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gpiod riscv64 support

1 participant